#include <linux/init.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/mod_devicetable.h>

int pdrv_probe(struct platform_device *pdev) {
	printk("-----probe-------\n");
	return 0;
}

int pdrv_remove(struct platform_device *pdev) {
	printk("-----remove-------\n");
	return 0;
}

const struct platform_device_id pid_table[] = {
	{"p001", 0x4444},
	{"p002", 0x4444},
};

struct platform_driver pdrv = {
	.probe = pdrv_probe,
	.remove = pdrv_remove,
	.driver = {
		.name = "pdrv",  // /sys/bus/platform/drivers/pdrv
	},
	.id_table = pid_table,
};

module_platform_driver(pdrv);

MODULE_LICENSE("GPL");
